from woniuatm_2.account import *

# 构建开始菜单
def start_menu():
    from woniuatm_2.user import reg
    from woniuatm_2.user import login

    tip = '''
***************** 欢迎来到WoniuATM **********************
***************** 请选择操作菜单 ************************
************* 1. 注册   2. 登录   3. 退卡 ***************
    '''
    print(tip)
    option = input("请输入你的操作选项：")
    if option == "1":
        reg()
    elif option == "2":
        login()
    elif option == "3":
        exit('谢谢，欢迎下次光临.')
    else:
        start_menu()

# 构建登录后业务菜单
def main_menu():
    tip = '''
*************************** 恭喜登录蜗牛银行 **********************************
*************************** 请选择操作菜单 ************************************
****** 1. 查询   2. 取款   3. 存款   4. 转账   5. 流水  6. 返回  7. 退卡 *******
        '''
    print(tip)
    option = input("请输入你的操作选项：")
    if option == "1":
        query()
    elif option == "2":
        withdraw()
    elif option == "3":
        deposite()
    elif option == "4":
        transer()
    elif option == "5":
        history()
    elif option == "6":
        start_menu()
    elif option == "7":
        exit('谢谢，欢迎下次光临.')

if __name__ == '__main__':
    start_menu()